﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Sockets;

namespace testClient
{
    class Program
    {
        static void Main(string[] args)
        {
            string host = System.Net.Dns.GetHostName();
            int port = 13000;
            //web client to work via http                        
            WebClient client = new WebClient();
            //encoding to bytes            
            byte[] msg = Encoding.ASCII.GetBytes("bla");
            // method UploadData - Send message
            byte[] answer = client.UploadData("http://" + host + ":" + port + "/", msg);
            //decoding from bytes array to string
            //message = Encoding.ASCII.GetString(answer);
            client.Dispose();
        }
    }
}
